package juego

import org.uqbar.arena.windows.SimpleWindow
import unq.model.Caso
import org.uqbar.arena.windows.WindowOwner
import org.uqbar.arena.widgets.Panel
import org.uqbar.arena.widgets.Button
import model.AppModel.ResolverMisterioAppModel
import org.uqbar.arena.widgets.Label
import org.uqbar.commons.utils.Observable

@Observable
class ReporteDeCrimenWindow extends SimpleWindow<ResolverMisterioAppModel> {
	
	new(WindowOwner parent, ResolverMisterioAppModel model) {
		super(parent, model)
		title = "detective, tenemos un caso para ud!"
	}
	
	override protected addActions(Panel actionsPanel) {
	new Button(actionsPanel) => [
		caption = "Aceptar Caso"
		onClick = [|new ResolviendoMisterioWindow(this, new ResolverMisterioAppModel(this.modelObject.caso)).open
			close
		]
	]
	}
	
	override protected createFormPanel(Panel mainPanel) {
		new Panel(mainPanel) => [
			new Label(it) => [
				text = modelObject.caso.reporte
			]
			new Label(it) => [
				
			]
		]
	}
	
}